import request from "./request"
import qs from "qs"
// 精品接口
export const gethomeapi = () => request.get("/products/recommend")
// 短信接口
export const getmsgapi = (params) => request.post("/sendSMS", qs.stringify(
    params
))
// 登录接口
export const getphoneReginapi = (verifyCode, phone) => request.post("/phoneRegin", qs.stringify(
    verifyCode, phone
))
// 用户信息接口
export const getuserapi = () => request.get("/shop/userProfiles")
// 微信接口
export const getPCLoginapi = (params) => request.post("/wechatUsers/PCLogin", qs.stringify(params))
// 注册接口
export const getReginapi = (params) => request.post("/wechatUsers/binding", qs.stringify(params))
// 更多热门 写到这里
export const gethotapi = () => request.get("/products/hot")
// 商品详情
export const getproductsapi = (params) => request.get("/products", {
    params
})
// 传值的详情页
export const getproductidsapi = (id) => request.get(`/products/${
    id
}`)
// 查看购物车
export const getcartsapi = () => request.get("/shop/carts")
// 加入购物车
export const getaddapi = (params) => request.post("/shop/carts/add",
    qs.stringify(params)
)
// 删除购物车
export const getdeleteapi = (id) => request.delete(`/shop/carts?productIds=${id}`)
// 添加数量
export const getaddcartapi = (params) => request.post(`/shop/carts/add`, qs.stringify(params))